package com.wn32.main.demo;

public class FBNQ {
    public static void main(String[] args) {
        //斐波那契数列1,1,2,3,5,8,13,21,34,55....
      int[] arr=new int[8];
        for (int i = 0; i < arr.length; i++) {
            if(i<=1){
                arr[i]=1;
            }else{
                arr[i]=arr[i-1]+arr[i-2];
            }
        }
        System.out.println(arr[arr.length-1]);
        }
}
